//FolderItem.java
package composite.safe;


/**
 *@author:youtubezou
 *@version:2012-7-17
 */
public abstract class FolderItem {
	private String name;
	private Folder parent;
	private boolean isFile;
	
	public FolderItem(String name,  Folder parent, boolean isFile){
		this.name = name;
		this.parent = parent;
		this.isFile = isFile;
	}
	

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Folder getParent() {
		return parent;
	}
	public void setParent(Folder parent) {
		this.parent = parent;
	}
	public boolean isFile() {
		return isFile;
	}
	
	public boolean equals(FolderItem item){
		return name.equals(item.name) && (isFile == item.isFile);
	}
}
